package j05zuoye;

public class J1 {
    public static void main(String[] args) throws Exception {
        for (int i = 1; i < 201; i++) {
            System.out.println(i);
            if(i==66){
                //水仙花
                waterFlower();
            }
            Thread.sleep(50);
        }
    }

    public static void waterFlower() {
        Thread t1 = new Thread(()->{
            for (int i = 100; i <= 999; i++) {
                System.out.println("水仙花为："+i);
            }
        });
        t1.start();
    }
}


class CleanTest{
    public static void main(String[] args) {
        new Thread("张三"){
            @Override
            public void run() {
                for (int i = 0; i < 200; i++) {
                    System.out.println(Thread.currentThread().getName()+"在扫地"+i);
                }
            }
        }.start();
        new Thread(()->{
            for (int i = 0; i < 180; i++) {
                System.out.println(Thread.currentThread().getName()+"在擦玻璃"+i);
            }
        },"李四").start();
    }
}